import api from "@/api";
import { PORT } from "../config/servicePort";

/**
 * 获取书籍列表
 */
export const getLineList = (data: any) => api.post(`${PORT}/api/dispatcher/loop/page`, data);

// 添加环线
export const createLine = (data: any) => api.post(`${PORT}/api/dispatcher/loop/save`, data);

// 修改环线
export const updateLine = (data: any) => api.post(`${PORT}/api/dispatcher/loop/update`, data);

// 环线创建任务
export const createTaskByLine = (data: any) => api.post(`${PORT}/api/dispatcher/loop/createJob`, data);

// 获取环线详情
export const getLineDetail = (data: any) => api.post(`${PORT}/api/dispatcher/loop/detail/${data.id}`);

// 更具月台ID获取站点列表
export const getSiteByScene = (data: any) => api.post(`${PORT}/api/dispatcher/scene/getsites`, data);

// 删除环线
export const deleteLine = (data: any) => api.post(`${PORT}/api/dispatcher/loop/delete/${data.id}`);
